import type { loginForm, loginRes, userRes } from './type.js'
import request from '@/utils/request'

enum API {
  LOGIN_URL = '/user/login',
  USERINFO_URL = '/user/info',
}

export const reqLogin = async (data: loginForm) => request.post<any, loginRes>(API.LOGIN_URL, data)
export const reqUserInfo = async () => request.get<any, userRes>(API.USERINFO_URL)
